import Vue from 'vue'
import Router from 'vue-router'
import Login from "../components/login"
import Home from "../components/home"
import Info from "../components/info"
import Nacos from "../components/nacos";
import Message from "../components/message"
import Monitor from "../components/monitor";
import SpringBoot from "../components/springboot";
import Sentinel from "../components/sentinel";
import Namespace from "../components/namespace";
import Discovery from "../components/discovery";
import Config from "../components/config";
import User from "../components/user";
import Admin from "../components/admin"
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name: 'Login',
      component: Login,
      meta:{
        title:'系统登录'
      }
    },
    {
      path:'/home',
      name: 'Home',
      component: Home,
      meta:{
        title:'初级管理员控制台'
      },
      children:[
        {
          path: '/info',
          name: 'Info',
          component: Info
        },
        {
          path:'/namespace',
          name:"Namespace",
          component: Namespace
        },
        {
          path:'/config',
          name:'Config',
          component: Config
        },
        {
          path:'/discovery',
          name:'Discovery',
          component:Discovery
        },
        {
          path: '/monitor',
          name: 'Monitor',
          component: Monitor
        },
        {
          path: '/message',
          name: 'Message',
          component: Message
        }
      ]
    },
    {
      path:'/admin',
      name:'Admin',
      component:Admin,
      meta:{
        title:'高级管理员控制台'
      },
      children:[
        {
          path: '/user',
          name:'User',
          component: User
        },
        {
          path: '/nacos',
          name:'Nacos',
          component: Nacos
        },
        {
          path:'/monitor',
          name:'Monitor',
          component: Monitor
        },
        {
          path: '/springboot',
          name:'SpringBoot',
          component: SpringBoot
        },
        {
          path:'/sentinel',
          name:'Sentinel',
          component: Sentinel
        }
      ]

    }

  ]
})
